package com.nai365.nart.member.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.common.core.util.R;
import com.nai365.nart.common.core.vo.WalletChangeVo;
import com.nai365.nart.member.entity.Wallet;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "walletRemoteService", value = ServiceNameConstants.MEMBER_SERVICE)
public interface WalletRemoteService {
	/**
	 * 修改钱包表
	 * @param wallet 钱包表
	 * @return R
	 */
	@ApiOperation(value = "修改钱包表", notes = "修改钱包表")
	@PutMapping("/wallet/updateByIdWallet")
	public R updateById(@RequestBody Wallet wallet,@RequestHeader(SecurityConstants.FROM) String from);


	/**
	 * 修改钱包表
	 * @param changeVo 钱包表
	 * @return R
	 */
	@ApiOperation(value = "修改钱包表", notes = "修改钱包表")
	@PostMapping("/wallet/update_inner")
	public R updateByIdInner(@RequestBody WalletChangeVo changeVo, @RequestHeader(SecurityConstants.FROM) String from) ;

	/**
	 * 内部调用---》
	 * @return
	 */
	@GetMapping("/wallet/findWalletByUserId/{userId}")
	public Wallet findWalletByUserId(@PathVariable("userId") Long userId, @RequestHeader(SecurityConstants.FROM) String from);
}
